#include "User.h"

void User::RxMsgWrapper ( void * pObject, const char * pBuffer, size_t size )
{
    User * pWork = reinterpret_cast<User *>(pObject) ;
    if(pWork)
        pWork->RxMsg(pBuffer, size) ;
}

void User::RxMsg ( const char * pBuffer, size_t size )
{
    readBuffer.assign(pBuffer, size) ;
    std::cout<< "Receive from agent:" << readBuffer ;
}

void User::outToAgent ( )
{
    server.writeMsg ( writeBuffer ) ;
}
